package com.zyf.rxjavaapp.webinterface

import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query
import retrofit2.http.QueryMap

/**
 * 作者：Think
 * 创建于 2017/4/1 10:06
 */
interface WebService{
    /**
     * 段子列表(文字,视频,图片)
     * */
    @GET("neihan/stream/mix/v1/?mpic=1&webp=1&essence=1&message_cursor=-1&longitude=108.965911&latitude=34.249754&am_longitude=108.970628&am_latitude=34.247896&am_city=%E8%A5%BF%E5%AE%89%E5%B8%82&count=30&screen_width=1080&double_col_mode=0&device_id=34710396729&ac=wifi&channel=xiaomi&aid=7&app_name=joke_essay&version_code=618&version_name=6.1.8&device_platform=android&ssmix=a&device_type=MI+5&device_brand=Xiaomi&os_api=24&os_version=7.0&uuid=862630039830089&openudid=b00b0621f1b5be08&manifest_version_code=618&resolution=1080*1920&dpi=480&update_version_code=6184 HTTP/1.1")
    fun getList(@Query("local_request_tag")local_request_tag:String,@Query("am_loc_time")am_loc_time:String,@Query("min_time")min_time:String,@Query("content_type")content_type:String): Call<String>
    /**
     * 点赞或者踩
     * */
    @POST("2/data/item_action/")
    fun fabulous(@QueryMap map:Map<String, String>):Call<String>
    /**
     * 请求评论
     * */
    @GET("neihan/comments/?count=20&offset=0&iid=9631001767&device_id=34710396729&ac=wifi&channel=xiaomi&aid=7&app_name=joke_essay&version_code=618&version_name=6.1.8&device_platform=android&ssmix=a&device_type=MI+5&device_brand=Xiaomi&os_api=24&os_version=7.0&uuid=862630039830089&openudid=b00b0621f1b5be08&manifest_version_code=618&resolution=1080*1920&dpi=480&update_version_code=6184 HTTP/1.1")
    fun getComments(@Query("group_id")group_id:String,@Query("item_id")item_id:String,@Query("offset")offset:Int):Call<String>
    /**
     * 获取点赞用户
     * */
    @GET("neihan/action/digg_users/?iid=9631001767&device_id=34710396729&ac=wifi&channel=xiaomi&aid=7&app_name=joke_essay&version_code=618&version_name=6.1.8&device_platform=android&ssmix=a&device_type=MI+5&device_brand=Xiaomi&os_api=24&os_version=7.0&uuid=862630039830089&openudid=b00b0621f1b5be08&manifest_version_code=618&resolution=1080*1920&dpi=480&update_version_code=6184%20HTTP/1.1")
    fun getDiggUser(@Query("id")id:String):Call<String>

    @POST("2/data/v2/post_message/")
    fun sendComment(@QueryMap map:Map<String, String>):Call<String>
}